<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/lampa_background">

    <TextView
        android:id="@+id/tvUpdateTitle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="top|center"
        android:layout_marginTop="30dp"
        android:gravity="center"
        android:text="@string/update_app_found"
        android:textAppearance="@style/TextAppearance.AppCompat.Large" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="left|top"
        android:layout_marginStart="20dp"
        android:layout_marginLeft="20dp"
        android:layout_marginTop="80dp"
        android:layout_marginEnd="20dp"
        android:layout_marginRight="20dp"
        android:orientation="vertical">

        <TextView
            android:id="@+id/tvCurrentVersion"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:text="@string/update_cur_version"
            android:textAppearance="@style/TextAppearance.AppCompat.Small" />

        <TextView
            android:id="@+id/tvNewVersion"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:text="@string/update_new_version"
            android:textAppearance="@style/TextAppearance.AppCompat.Small" />

        <TextView
            android:id="@+id/tvUpdateInfo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            tools:text="@string/update_loading" />

    </LinearLayout>

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="right|top"
        android:layout_marginTop="86dp"
        android:layout_marginEnd="26dp"
        android:layout_marginRight="20dp"
        android:gravity="center"
        android:minWidth="70dp"
        android:minHeight="70dp"
        android:orientation="vertical">

        <!-- https://material.io/components/progress-indicators/android#using-progress-indicators -->
        <com.google.android.material.progressindicator.CircularProgressIndicator
            android:id="@+id/pbUpdate"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:visibility="gone"
            app:indicatorColor="?attr/colorAccent"
            app:indicatorSize="70dp"
            app:trackColor="@color/white_35"
            tools:visibility="visible" />

        <TextView
            android:id="@+id/tvUpdatePrc"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="-52dp"
            android:lineSpacingExtra="0dp"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            android:textColor="@color/white_35"
            android:textSize="18sp"
            tools:text="100%" />

    </LinearLayout>

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="right|top"
        android:layout_marginStart="20dp"
        android:layout_marginLeft="20dp"
        android:layout_marginTop="200dp"
        android:layout_marginEnd="20dp"
        android:layout_marginRight="20dp"
        android:layout_marginBottom="90dp"
        android:fadingEdgeLength="40dp"
        android:requiresFadingEdge="vertical">

        <TextView
            android:id="@+id/tvOverview"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
    </ScrollView>


    <LinearLayout
        style="@android:style/DeviceDefault.ButtonBar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:layout_margin="10dp"
        android:layout_marginBottom="10dp"
        android:divider="?android:attr/dividerVertical"
        android:gravity="end"
        android:orientation="horizontal"
        android:showDividers="none">

        <Button
            android:id="@+id/btnCancel"
            style="@style/Widget.MaterialComponents.Button.OutlinedButton"
            android:layout_width="140dp"
            android:layout_marginStart="5dp"
            android:layout_marginEnd="8dp"
            android:layout_height="wrap_content"
            android:text="@string/cancel" />

        <Button
            android:id="@+id/btnUpdate"
            style="@style/Widget.MaterialComponents.Button.OutlinedButton"
            android:layout_width="140dp"
            android:layout_marginStart="8dp"
            android:layout_marginEnd="5dp"
            android:layout_height="wrap_content"
            android:text="@string/update_install">

            <requestFocus />
        </Button>

    </LinearLayout>
</FrameLayout>